from django.shortcuts import render
from django.shortcuts import redirect
import os
# Create your views here.
# 分页工具 Paginator
from django.core.paginator import Paginator
from django.views.decorators.csrf import csrf_exempt

from django.conf import settings    # 获取 settings.py 里边配置的信息
import pyecharts.options as opts
from pyecharts.charts import Pie
from django.http import HttpResponse


def index(request):
    return HttpResponse("Hello, world. You're at the kind_admin index.")
    #return render(request, 'index.html')

def login(request):
    if request.method == "POST":
        username = request.POST.get('username')
        password = request.POST.get('password')
        print(username, password)

        return redirect('/index/')
    return render(request, 'login.html')

def logout(request):
    pass
    return redirect("/login/")
    



